			<div class="post">
				<h2 class="title">

<?php
$allItems = $this->allItems;

echo count($allItems);
$currentPage = $this->currentPage;

if ($currentPage) {
    // check exists parent
    if ($currentPage['all_parent']) {
        $allParent = explode(',', $currentPage['all_parent']);
        if (isset($allParent[0])) {
            $allCategory = $this->allCategory;
            foreach($allParent as $parentID):
                $parent = $allCategory[$parentID];
                // check to ignore root
                if ($parent['left'] != 1) {
                ?>
                    <a href="<?php echo BASE_PATH . '/' . CURR_APP ?>?pid=<?php echo $parent['category_id']?>"><?php echo $parent['admin_title'];?></a> >> 
                <?php
                }
            endforeach;
        }
        echo $currentPage['admin_title'];
    }
}
?>

                </h2>
                <div class="story">
<?php

if (isset($allItems[0])) {
    foreach($allItems as $item):
    ?>
    <div style="padding: 0px 10px;text-align:center;float:left;width:120px;height:150px;overflow:hidden;">
		<?php
		$path = pathinfo($item['item_image'], PATHINFO_DIRNAME);
		$fileName = pathinfo($item['item_image'], PATHINFO_BASENAME);
		?>
        <div style="">
            <a rel="example_group" href="<?php echo BASE_PATH . $item['item_image'] ?>" title="<?php echo htmlspecialchars($item->item_title); ?>">
            <img src="<?=ImageUtil::getImage($path,$fileName,80,100, 75,false)?>" class="border">
            <div>
                <?php echo $item->item_title; ?>
            </div>
            </a>
        </div>
        <div style="clear:both;"></div>
    </div>


    <?php
    endforeach;
    echo '<div style="clear:both;"></div>';
    echo $this->paging;
} // if items
?>
                </div>
</div>
                        
                        
    <script type="text/javascript" src="<?=JS_PATH?>/jquery/jquery-min-1.3.2.js" ></script>
	<script type="text/javascript" src="<?=JS_PATH?>/jquery/jquery.fancybox-1.3.2/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
	<script type="text/javascript" src="<?=JS_PATH?>/jquery/jquery.fancybox-1.3.2/fancybox/jquery.fancybox-1.3.2.js"></script>
	<link rel="stylesheet" type="text/css" href="<?=JS_PATH?>/jquery/jquery.fancybox-1.3.2/fancybox/jquery.fancybox-1.3.2.css" media="screen" />
	<script type="text/javascript">
		$(document).ready(function() {
			$("a[rel=example_group]").fancybox({
				'titlePosition'		: 'inside',
				'overlayColor'		: '#000',
				//'overlayOpacity'	: 0.9,
                'transitionIn'	:	'elastic',
                'transitionOut'	:	'elastic',
                'speedIn'		:	600, 
                'speedOut'		:	200, 
                'autoScale'     :   false
			});
		});
	</script>
